#pragma once
#include <fstream>
#include <string>
#include <vector>
#include "../utility/defs.h"
using namespace std;

class cHeightmap
{
public:
	cHeightmap();
	void LoadRAW(string rawfiles,int rows,int cols);
	void Filter3x3();
	void SetScale(float scale){ m_scale = scale;; }
	void SetOffset(float offset){ m_offset = offset; }
	float GetHeight(int row,int col);
	void SetHeight(int row,int col,float height);
private:
	bool inBounds(int row,int col);
	void FilterPixel3x3(int row,int col);
private:
	float m_scale;
	float m_offset;
	int m_rows;
	int m_cols;
	vector<float> vecHeightmap;
};
